<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动布局</title>
    <style>
        * { margin: 0; padding: 0}

        .wrap {
            width: 100%;
            height: 600px;
            background-color: gray;
            border: 1px solid red;
        }

        .box {
            width: 100px;
            height: 50px;
            background-color: aqua;
            margin: 10px 5px 10px 20px;
            float: left;
        }

    </style>
</head>
<body>
<div class="wrap">
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
    <div class="box"></div>
</div>
</body>
</html>